<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <link href="./js/video/video-js.css" rel="stylesheet"/>
</head>
<button class="gray-bg">
<input id="video" type="text" ><button type="button" onclick="show()"/>确认</button>
<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" autoplay width="640" height="268"
       data-setup='{ "techOrder": ["flash"] }'>
    <source src="rtmp://192.168.10.98/oflaDemo/192.168.20.13" type='rtmp/mp4' id="videoMP4">
</video>
<!--<th:block th:include="include :: footer"/>-->
<script>var contextPath = "/red5_hls";</script>
<script type='text/javascript' src='./js/video/video.js'></script>
<script src="./js/video/videojs.hotkeys.min.js" type='text/javascript' ></script>
<script>
    videojs("my_video_1").ready(function() {
        this.hotkeys({
            volumeStep: 0.1,
            seekStep: 5,
            enableVolumeScroll: false, //禁用鼠标滚轮调节问音量大小
            enableModifiersForNumbers: false
        });
    });
         videojs.options.flash.swf = "./js/video/video-js.swf"
         var video = document.getElementById('my_video_1');
         var source = document.getElementById('videoMP4');
         function show() {
             var videoUrl = document.getElementById("video").value;
             videojs("my_video_1").ready(function() {

                 var myPlayer = this;
                 myPlayer.src("rtmp://192.168.10.98/oflaDemo/"+videoUrl); /*动态设置video.js播放的地址。*/
                 myPlayer.autoplay();
             });
         }
</script>
</body>
</html>
